Skip to content

Cape Town | 26-ITP-Jan | Pretty Taruvinga | Sprint 1 | Data Groups#1104

Open
Pretty548 wants to merge 17 commits intoCodeYourFuture:mainfrom
Pretty548:coursework/Sprint-1
Open

Cape Town | 26-ITP-Jan | Pretty Taruvinga | Sprint 1 | Data Groups#1104
Pretty548 wants to merge 17 commits intoCodeYourFuture:mainfrom
Pretty548:coursework/Sprint-1

Conversation

@Pretty548
Copy link
Copy Markdown

@Pretty548 Pretty548 commented Mar 26, 2026

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

  • Implemented functions for data groups exercises
  • Fixed median calculation logic
  • Added/updated tests to pass all cases
  • Cleaned up code to follow style guide

@github-actions

This comment has been minimized.

@Pretty548 Pretty548 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 26, 2026
@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Mar 26, 2026
Copy link
Copy Markdown
Contributor

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other changes look good.

Note: Don't forget to add the "Need Review" label when your PR is ready to be re-reviewed.

Comment on lines +35 to +41
test("Given an array with no duplicates, when passed to the dedupe function, then it should return a copy of the original array", () => {
const input = ["a", "b", "c"];
const result = dedupe(input);

expect(result).toEqual(input);
expect(result).not.toBe(input);
});
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a chance that, even though result has incorrect elements (for example, []),
the two tests could still pass. Can you figure out why, and then fix the tests accordingly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants